<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="zh-cn">
    <head>
        <!-- Bootstrap -->
        <include file="Include/css" />
        <title>中经汇通-首页</title>
        <link href="__STATICS__/css/admin/index.css" rel="stylesheet">
            <link rel="stylesheet" href="__STATICS__/css/jquery-ui-date.min.css"/>
            <link rel="stylesheet" href="__STATICS__/css/jquery-ui-date.theme.min.css"/>

    </head>
    <body>
        <include file="Include/nav_top" />
        <div class="container clearfix" id="left_menu_wraper" >
            <include  file="Include/menu_left" />
            <div id="right-content">
                <div id="right-content-inner">
                    <ul class="breadcrumb">
                        <span>您的位置：</span>
                        <li><a href="{:U('CNEPAdmin/Index/index')}">首页</a> </li>
                        <li class="">系统管理</li>
                        <li class="active">角色设置</li>
                    </ul>


                    <div id="message_wraper"  class="alert alert-danger  alert-dismissible" role="alert">

                        <!--关闭按钮-->
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                        <!--内容-->

                        <strong>温馨提示：</strong> <span id="message" >{$lastsql}</span>
                    </div>
                    <p>
                        <button id="add_look" class="btn btn-orange" type="button" >
                            添加角色
                        </button>
                    </p>

                    <div role="tabpanel">

                        <div class="row clearfix margin10 form-horizontal">
                            <form  name="query" method="POST" >
                                <!--                            <div class="col-md-2">
                                                                <select name="goods_cat" class="pull-left ml10 form-control">
                                                                    <option value="0">宝贝类别</option>
                                                                    <option value="1">1</option>
                                                                    <option value="2">2</option>
                                                                </select>
                                                            </div>-->
                                <span class="pull-left ml30 form_bar">查询：</span>
                                <div class="col-md-2">
                                    <input type="text" name="sRoleName" value="{$Think.post.sRoleName}" placeholder=" 角色名称" class="pull-left ml10 form-control" />
                                </div>

                                <button type="submit" class="pull-left btn btn-default ml20">
                                    搜索
                                </button>
                            </form>

                            <div class="btn-group pull-right clearfix" data-toggle="buttons">
                                <label class="btn btn-info active">
                                    <input type="radio" id="option1" autocomplete="off" checked> 已激活
                                </label>
                                <label class="btn btn-info">
                                    <input type="radio" id="option2" autocomplete="off"> 未激活
                                </label>
                            </div>
                        </div>

                        <table class="table table-striped table_qrcode">
                            <!--<caption>标题</caption>-->
                            <thead>
                                <tr class="border">
                                    <th>编号</th>
                                    <th>角色名称</th>
                                    <th>描述</th>
                                    <th>添加时间</th>
                                    <th>更新时间</th>
                                    <th>是否激活</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <volist name="list" id="vo">
                                    <tr class="qr_tar">
                                        <td>
                                            {$i+$num}
                                        </td>
                                        <td class="text-align-left">
                                            <span class="table_goods_text">
                                                {$vo.roleName}
                                            </span>
                                        </td>
                                        <td>{$vo.descript}</td>
                                        <td>{$vo.addTime|date="Y/m/d H:i:s",###} </td>
                                        <td>{$vo.updateTime|date="Y/m/d H:i:s",###} </td>
                                        <td>{$vo['isEnabled'] ?  '已激活':'未激活'} </td>
                                        <td><a href="javascript:void(0)" id="edit_look" >编辑</a> 
                                            /
                                            <!--<a href="{:U('CNEPAdmin/SysAdminRole/deleteRole',array('roleID'=>$vo['roleID']))}" >删除</a>--> 
                                        </td>
                                    </tr>
                                </volist>
                            </tbody>
                        </table>

                        <div class="clearfix s_page pull-right">
                            {$page}
                        </div>

                    </div>

                </div>

            </div>
        </div>

        <!-- Modal -->
        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="myModalLabel"> </h4>
                    </div>
                    <div class="modal-body">
                        <form >
                            <div class="row clearfix">
                                <div class="col-md-12 margin10">
                                    <div class="col-md-2 text_right form_bar">
                                        角色名称：
                                    </div>
                                    <div class="col-md-6">
                                        <input type="text" class="form-control"/>
                                    </div>
                                    <div class="col-md-1 text_warning text_left form_bar">
                                        *
                                    </div>
                                </div>
                                <div class="col-md-12 margin10">
                                    <div class="col-md-2 text_right form_bar">
                                        角色描述：
                                    </div>
                                    <div class="col-md-6">
                                        <input type="text" class="form-control"/>
                                    </div>
                                    <div class="col-md-1 text_warning text_left form_bar">
                                        *
                                    </div>
                                </div>
                                <div class="col-md-12 margin10">
                                    <div class="col-md-2 text_right form_bar">
                                        是否激活：
                                    </div>
                                    <div class="btn-group clearfix" data-toggle="buttons">
                                        <label class="btn btn-warning btn-sm active">
                                            <input type="radio" id="option1" autocomplete="off" checked> 激活
                                        </label>
                                        <label class="btn btn-warning btn-sm">
                                            <input type="radio" id="option2" autocomplete="off"> 禁止
                                        </label>
                                    </div>
                                </div>
                                
                            </div>
                        </form>

                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <button type="button" class="btn btn-primary" id="save" >保存</button>
                    </div>
                </div>
            </div>
        </div>

        <include file="Include/script" />
        <script>
            /*菜单展开及高亮*/
            $(function () {
                $('.system').addClass('open');
                $('#system2').addClass('active');

                $("#add_look").on("click", function () {
                    $("#myModalLabel").html("添加管理员");
                    $('#myModal').modal(); // 跳出弹窗
                });
                $("#edit_look").on("click", function () {
                    $("#myModalLabel").html("编辑管理员");
                    $('#myModal').modal(); // 跳出弹窗
                });

                $("#save").on("click", function () {
                    if (checkValue()) {

                    }
                });

            });

            function checkValue() {

            }
        </script>
    </body>
</html>